package ai.leinao.notify.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * description
 *
 * @author zhong.wang
 * @date 2025/7/10
 */
@AllArgsConstructor
@Getter
public enum DataType {
    STRING("string", "字符串"),
    ENUM("enum", "枚举"),
    DATE("date", "未知");
    private final String type;
    private final String desc;

    public static DataType getDataType(String type) {
        for (DataType dataType : DataType.values()) {
            if (dataType.getType().equals(type)) {
                return dataType;
            }
        }
        return DataType.STRING;
    }
}
